#ifndef TASKCREATOR_H
#define TASKCREATOR_H

#include "QVector"
#include "QColorDialog"

#include "DataHelper.h"

namespace Ui {
class TaskCreator;
}

class TaskCreator : public QWidget
{
    Q_OBJECT

public:
    explicit TaskCreator(QWidget *parent = nullptr);
    ~TaskCreator();

    void setTaskCreation(bool status, const QVector<Group*> *groups);

signals:
    void sendTaskToParent(QString *newTaskName, int groupId, uint timer, uint times);
    void sendGroupToParent(QString *newGroupName, QColor *color);

private slots:   
    void on_addTaskBtn_clicked();
    void on_exitTaskBtn_clicked();
    void on_changeColorBtn_clicked();
    void on_userSelectColor(const QColor &color);

private:
    Ui::TaskCreator *ui;
    const QVector<Group*> *groups;

    bool isTaskCreating;

    QColorDialog colorSelector;
    QColor groupColor;
};

#endif // TASKCREATOR_H
